package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.dto.MailRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicSmsConfigMapper;
import com.ruoyi.system.domain.BasicSmsConfig;
import com.ruoyi.system.service.IBasicSmsConfigService;

/**
 * 短信配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicSmsConfigServiceImpl implements IBasicSmsConfigService 
{
    @Autowired
    private BasicSmsConfigMapper basicSmsConfigMapper;

    /**
     * 查询短信配置
     * 
     * @param smsConfigId 短信配置主键
     * @return 短信配置
     */
    @Override
    public BasicSmsConfig selectBasicSmsConfigBySmsConfigId(Long smsConfigId)
    {
        return basicSmsConfigMapper.selectBasicSmsConfigBySmsConfigId(smsConfigId);
    }

    /**
     * 查询短信配置列表
     * 
     * @param basicSmsConfig 短信配置
     * @return 短信配置
     */
    @Override
    public List<BasicSmsConfig> selectBasicSmsConfigList(BasicSmsConfig basicSmsConfig)
    {
        return basicSmsConfigMapper.selectBasicSmsConfigList(basicSmsConfig);
    }

    /**
     * 新增短信配置
     * 
     * @param basicSmsConfig 短信配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicSmsConfig(BasicSmsConfig basicSmsConfig)
    {
        return basicSmsConfigMapper.insertBasicSmsConfig(basicSmsConfig);
    }

    /**
     * 修改短信配置
     * 
     * @param basicSmsConfig 短信配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicSmsConfig(BasicSmsConfig basicSmsConfig)
    {
        return basicSmsConfigMapper.updateBasicSmsConfig(basicSmsConfig);
    }

    /**
     * 批量删除短信配置
     * 
     * @param smsConfigIds 需要删除的短信配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicSmsConfigBySmsConfigIds(Long[] smsConfigIds)
    {
        return basicSmsConfigMapper.deleteBasicSmsConfigBySmsConfigIds(smsConfigIds);
    }

    /**
     * 删除短信配置信息
     * 
     * @param smsConfigId 短信配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicSmsConfigBySmsConfigId(Long smsConfigId)
    {
        return basicSmsConfigMapper.deleteBasicSmsConfigBySmsConfigId(smsConfigId);
    }
}
